package cn.tedu.spring.iocxml.bean;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class studentTest {
    /**
     * 演示接口有唯一的实现类是，能否根据接口class获取bean
     */
    @Test
    public void impTest(){
        ApplicationContext context=new  ClassPathXmlApplicationContext("bean.xml");
        Student student=context.getBean(Student.class);
        student.run();
    }
}
